home *** CD-ROM | disk | FTP | other *** search
- Path: cs.city.ac.uk!be584
- From: be584@city.ac.uk (Olatunbosun S)
- Newsgroups: comp.sys.amiga.programmer
- Subject: fast sample retrigger
- Date: 4 Apr 1996 15:05:12 GMT
- Organization: School of Informatics, City University, London
- Message-ID: <4k0of8$8v7@bambam.soi.city.ac.uk>
- NNTP-Posting-Host: swindon.city.ac.uk
-
-
- Could somebody please, please help me with this irritating problem. I'm trying
- to retrigger a sample on the same audio channel but I want to do it very
- quickly. However, the audible result is that the sample regularly carries on
- from where it was stopped (DMA off) instead of starting from the beginning.
- I've read the RKM Devices book and understand that there must be a delay of
- 2 periods before the audio channel is started again (DMA on) and so my code is
- something like the following
-
- (set up audio channel)
- .
- .
- custom.dmacon = DMAF_AUDx /* x = 0-3 stop DMA */
- .
- .
- (pause for a while)
- .
- .
- custom.dmacon = DMAF_SETCLR | DMAF_MASTER | DMAF_AUDx
-
-
- If I use a pause of "Delay(1)", which is far too long, I can get samples
- with high playback rates (>25000 samples per sec) to retrigger, but slower
- sample rates (<15000 samples per sec) ALWAYS fail. I've even tried ridiculously
- long delays of 2 seconds and I still get the same problem with low rate samples.
- So what am I doing wrong? Am I forgetting to write (reset) some other registers
- in the audio hardware (eg custom.aud[x].ac_ptr) before retriggering the sample?
-
- I'm doing the above experimentation on a a basic A1200 running DICE v2.07.54
-
- Sheun
-
-